//
//  DCStoresRecommendHeaderView.m
//  商城
//
//  Created by runone02 on 2018/8/29.
//  Copyright © 2018年 liqiyun. All rights reserved.
//

#import "DCStoresRecommendHeaderView.h"

@implementation DCStoresRecommendHeaderView


- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
//    @property (strong, nonatomic)  UILabel *headRecommendLabel;
//    @property (strong, nonatomic)  DCZuoWenRightButton *rightMoreButton;
    UIView *line = [[UIView alloc]init];
    line.backgroundColor = [UIColor redColor];
    [self addSubview:line];
    
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self).with.offset(W_RATIO(10));
        make.bottom.mas_equalTo(self).with.offset(-W_RATIO(10));
        make.left.mas_equalTo(self).with.offset(W_RATIO(20));
        make.width.mas_equalTo(5);
    }];
    
    self.headRecommendLabel = [[UILabel alloc]init];
    self.headRecommendLabel.text = @"热门商品";
    self.headRecommendLabel.font = TITLE_FONT(30);
    self.headRecommendLabel.textAlignment = NSTextAlignmentLeft;
    [self addSubview:self.headRecommendLabel];
    [self.headRecommendLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(line.mas_right).with.offset(W_RATIO(20));
        make.centerY.mas_equalTo(self);
        make.width.mas_equalTo(ScreenW/3);
    }];
    self.moreLabel = [[UILabel alloc]init];
    self.moreLabel.textAlignment = NSTextAlignmentRight;
    self.moreLabel.font = TITLE_FONT(30);
    [self addSubview:self.moreLabel];
    [self.moreLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(self).with.offset(-10);
        make.centerY.mas_equalTo(self);
        make.width.mas_equalTo(SCREEN_WIDTH/3);
    }];
}
@end
